package exception;

public class OrderNotExistException extends Exception {
	
	private static final long serialVersionUID = -456219699860669831L;
	
	public Throwable detail;
	
	public OrderNotExistException() {
		initCause(null);
	}
	
	public OrderNotExistException(String s) {
		super(s);
		initCause(null);
	}
	
	public OrderNotExistException(String s, Throwable cause) {
		super(s);
		initCause(cause);
		detail = cause;
	}
	
	public String getMessage() {
		if (detail == null) {
			return super.getMessage();
		} else {
			return detail.toString();
		}
	}
	
	public Throwable getCause() {
		return detail;
	}

}
